webpackJsonp([70],{

/***/ "HzfL":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/promise.js
var promise = __webpack_require__("rVsN");
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("KH7x");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// EXTERNAL MODULE: ./src/store/index.js
var store = __webpack_require__("IcnI");

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/apps/danger-source-check/list.vue




//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var list = ({
  data: function data() {
    var _this = this;

    return {
      search: false,
      rightData: [{
        font: 'yt-icon yt-icon-search',
        click: function click() {
          _this.search = !_this.search;
        }
      }],
      entList: [],
      enterpriseId: '',
      selected: '-1',
      searchApi: function () {
        var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(_ref2) {
          var skip = _ref2.skip,
              limit = _ref2.limit;

          var param, p, _ref3, _ref4, items, entList, hierarchyDic;

          return regenerator_default.a.wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  _this.enterpriseId = Object(store["d" /* JudgeRole */])().enterprise(function () {
                    return (Object(store["c" /* GetStore */])(store["f" /* Store */].enterprise) || {}).id;
                  }).default();
                  param = {};

                  if (_this.selected === '-1' && _this.enterpriseId) {
                    param = {
                      equalTo: {
                        unit: _this.enterpriseId
                      }
                    };
                  } else if (_this.selected !== '-1') {
                    param = {
                      equalTo: {
                        unit: _this.selected
                      }
                    };
                  } else {
                    param = null;
                  }
                  p = [commonApi["a" /* commonApi */].search('security_risk_filing', param), commonApi["a" /* commonApi */].search('ent_enterprise')];
                  _context.next = 6;
                  return promise_default.a.all(p);

                case 6:
                  _ref3 = _context.sent;
                  _ref4 = slicedToArray_default()(_ref3, 3);
                  items = _ref4[0];
                  entList = _ref4[1];
                  hierarchyDic = _ref4[2];

                  entList.unshift({ id: '-1', EnterpriseName: '全部' });
                  _this.entList = entList;
                  return _context.abrupt('return', items);

                case 14:
                case 'end':
                  return _context.stop();
              }
            }
          }, _callee, _this);
        }));

        return function searchApi(_x) {
          return _ref.apply(this, arguments);
        };
      }()
    };
  },
  activated: function activated() {},

  methods: {
    goDetailPage: function goDetailPage(id) {
      this.$router.$push({ path: '/danger-source-check/detail', query: { id: id } });
    },
    onSearch: function onSearch() {
      this.search = false;
      this.$refs.group.startPull();
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-379075c5","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/apps/danger-source-check/list.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"重大危险源","rightData":!_vm.enterpriseId ? _vm.rightData: []}},[_c('yt-group',{ref:"group",attrs:{"group":false,"searchApi":_vm.searchApi},scopedSlots:_vm._u([{key:"default",fn:function(item){return _c('yt-cell',{attrs:{"label":item.name,"labelWidth":"100%","isLink":""},on:{"click":function($event){return _vm.goDetailPage(item.id)}}})}}])}),_vm._v(" "),_c('yt-popup',{attrs:{"slot":"alert","pos":"right","mask":true},slot:"alert",model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:"search"}},[_c('yt-page',{staticClass:"page",attrs:{"flex":true,"leftData":[],"title":"企业列表"}},[_c('yt-form',{staticStyle:{"background-color":"#fff"}},[_c('yt-radioList',{staticClass:"list",attrs:{"list":_vm.entList,"label":"EnterpriseName","val":"id","inline":false},model:{value:(_vm.selected),callback:function ($$v) {_vm.selected=$$v},expression:"selected"}}),_vm._v(" "),_c('yt-btn-group',{attrs:{"slot":"btn","shadow":false},slot:"btn"},[_c('yt-btn',{attrs:{"theme":"white"},on:{"click":function($event){_vm.search = false}}},[_vm._v("关闭")]),_vm._v(" "),_c('yt-btn',{on:{"click":function($event){return _vm.onSearch(_vm.selected)}}},[_vm._v("确定")])],1)],1)],1)],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var danger_source_check_list = (esExports);
// CONCATENATED MODULE: ./src/apps/danger-source-check/list.vue
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  list,
  danger_source_check_list,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var apps_danger_source_check_list = __webpack_exports__["default"] = (Component.exports);


/***/ })

});